<b>Registrati al blackjack online<br /></b> L'iscrizione &egrave; gratuita!<br /><br />
	<form action="#" method="POST">
		<table>
			<tr>
				<td>Nome: </td>
				<td><input type="text" value="<?php if(isset($_POST['name'])){echo $_POST['name'];}?>" name="name"/></td>
			</tr>
			<tr>
				<td>Cognome: </td>
				<td><input type="text" value="<?php if(isset($_POST['surname'])){echo $_POST['surname'];}?>" name="surname"/></td>
			</tr>
			<tr>
				<td>Email: </td>
				<td><input type="text" value="<?php if(isset($_POST['reg_email'])){echo $_POST['reg_email'];}?>" name="reg_email"/></td>
			</tr>
			<tr>
				<td class="desc">Localit&agrave;: </td>         
            	<td>
                	<select name="city">                    
                    	<?php
                    		$city = new City();
                    		// Preparazione della query per l'inserimento dei dati del login
							$cities = $city->loadCities();
							
							
							while($row = $cities->FetchRow()) {   
                            	if(isset($_POST['city'])){
                    				if($row['ID_CITY'] == $_POST['city']){
                    					echo '<option value="'.$_POST['city'].'" SELECTED VALUE="' . $_POST['city'] . '">';  
                    						// Carica i valori del DB nelle variabili $id e $nome di classe	
                    						$city->loadCity($_POST['city']);
                    						
	                         				echo $city->name;	
		                         		echo '</option>';
		                         	}else{
	                    				echo '<option value="'.$row['ID_CITY'].'">';   
		                         			echo $row['name'];                           
		                              	echo '</option>';
		                         	}                      
                    			}else{
                    				echo '<option value="'.$row['ID_CITY'].'">';   
	                         			echo $row['name'];                          
	                              	echo '</option>';
                    			}                                         
                         	}
							
                      	?>      
                   	</select>
                </td>
			</tr>
			<tr>
				<td>Et&agrave;: </td>
				<td class="age">
					<select name="day">                    
                    	<?php
                    		for($i=1;$i<=31;$i++){
                    			if(isset($_POST['day'])){
                    				if($i == $_POST['day']){
                    					echo '<option value="'.$_POST['day'].'" SELECTED VALUE="' . $_POST['day'] . '">';  
		                         			echo $_POST['day'];
		                         		echo '</option>';
		                         	}else{
	                    				echo '<option value="'.$i.'">';   
		                         			echo $i;                               
		                              	echo '</option>';
		                         	}                      
                    			}else{
                    				echo '<option value="'.$i.'">';   
	                         			echo $i;                               
	                              	echo '</option>';
                    			}
                    		}
                      	?>      
                   	</select>
					<select name="month">                    
                    	<?php
                    		for($i=1;$i<=12;$i++){
                    			if(isset($_POST['month'])){
                    				if($i == $_POST['month']){
                    					echo '<option value="'.$_POST['month'].'" SELECTED VALUE="' . $_POST['month'] . '">';  
		                         			echo $_POST['month'];
		                         		echo '</option>';
		                         	}else{
	                    				echo '<option value="'.$i.'">';   
		                         			echo $i;                               
		                              	echo '</option>';
		                         	}                      
                    			}else{
                    				echo '<option value="'.$i.'">';   
	                         			echo $i;                               
	                              	echo '</option>';
                    			}
                    		}
                      	?>      
                   	</select>
					<select name="year">                    
                    	<?php
                    		for($i=2010;$i>=1900;$i--){
                    			if(isset($_POST['year'])){
                    				if($i == $_POST['year']){
                    					echo '<option value="'.$_POST['year'].'" SELECTED VALUE="' . $_POST['year'] . '">';  
		                         			echo $_POST['year'];
		                         		echo '</option>';
		                         	}else{
	                    				echo '<option value="'.$i.'">';   
		                         			echo $i;                               
		                              	echo '</option>';
		                         	}                      
                    			}else{
                    				echo '<option value="'.$i.'">';   
	                         			echo $i;                               
	                              	echo '</option>';
                    			}
                    		}
                      	?>      
                   	</select>
           		</td>
			</tr>
			<tr>
				<td>Password: </td>
				<td><input type="password" name="password"/></td>
			</tr>
			<tr>
				<td>Ripeti password: </td>
				<td><input type="password" name="rpassword"/></td>
				
			</tr>
			<tr>
				<td></td>
				<td><input type="submit" id="containerright_submit" value="Iscriviti" name="reg_submit"/></td>
			</tr>
			<tr>
				<td colspan="2"><span id="reg_checkbox"><input type="checkbox" class="checkbox" <?php if(isset($_POST['rule'])){ echo 'checked="yes"';}?>name="rule"><A id="reg_text" style="color:white" HREF="javascript:popUp('php/pages/rule.php')">Accetto i termini e le condizioni</A><a href="#" ></input></span></td>
			</tr>
			
		</table>
	</form>